﻿Imports Microsoft.VisualBasic

Public Class DBPaymentVoucherHdrSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public PaymentVoucherID As New TableField("PaymentVoucherID", Data.SqlDbType.Int)
    Public Year As New TableField("Year", Data.SqlDbType.Int)
    Public PaymentVoucherNo As New TableField("PaymentVoucherNo", Data.SqlDbType.NVarChar)
    Public PaymentVoucherDate As New TableField("PaymentVoucherDate", Data.SqlDbType.DateTime)
    Public MainCostCenter As New TableField("MainCostCenter", Data.SqlDbType.Int)
    Public CostCenter As New TableField("CostCenter", Data.SqlDbType.Int)
    Public PaidforAccountNo As New TableField("PaidforAccountNo", Data.SqlDbType.Int)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)
    Public RecordStatus As New TableField("RecordStatus", Data.SqlDbType.Int)
    Public LastUpdateBy As New TableField("LastUpdateBy", Data.SqlDbType.NVarChar)
    Public LastUpdateDate As New TableField("LastUpdateDate", Data.SqlDbType.DateTime)


    Sub New()
        MyBase.StoredProcedureName = "PaymentVoucherHdrSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal PaymentVoucherID As String = "", _
                                 Optional ByVal Year As String = "", _
                                 Optional ByVal PaymentVoucherNo As String = "", _
                                 Optional ByVal PaymentVoucherDate As String = "", _
                                 Optional ByVal MainCostCenter As String = "", _
                                 Optional ByVal CostCenter As String = "", _
                                 Optional ByVal PaidforAccountNo As String = "", _
                                   Optional ByVal Remarks As String = "", _
                                  Optional ByVal RecordStatus As String = "", _
                                  Optional ByVal LastUpdateBy As String = "", _
                                  Optional ByVal LastUpdateDate As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.PaymentVoucherID.SetValue(PaymentVoucherID, MyBase.FieldsArrayList)
        Me.Year.SetValue(Year, MyBase.FieldsArrayList)
        Me.PaymentVoucherNo.SetValue(PaymentVoucherNo, MyBase.FieldsArrayList)
        Me.PaymentVoucherDate.SetValue(PaymentVoucherDate, MyBase.FieldsArrayList)
        Me.MainCostCenter.SetValue(MainCostCenter, MyBase.FieldsArrayList)
        Me.CostCenter.SetValue(CostCenter, MyBase.FieldsArrayList)
        Me.PaidforAccountNo.SetValue(PaidforAccountNo, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)
        Me.RecordStatus.SetValue(RecordStatus, MyBase.FieldsArrayList)
        Me.LastUpdateBy.SetValue(LastUpdateBy, MyBase.FieldsArrayList)
        Me.LastUpdateDate.SetValue(LastUpdateDate, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
